home *** CD-ROM | disk | FTP | other *** search
- Path: san-jose.netgen.com!erichard
- From: Eric Richard <erichard@netgen.com>
- Newsgroups: comp.lang.c++
- Subject: GCC and Default Constructors
- Date: Sat, 20 Jan 1996 17:29:29 -0500
- Organization: net.Genesis Corp.
- Message-ID: <Pine.LNX.3.91.960120172645.1558N-100000@san-jose.netgen.com>
- NNTP-Posting-Host: san-jose.netgen.com
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
-
- I just spent about 3 days intermittently trying to solve a problem that
- I finally figured out and I was trying to see if there is something
- I can do to avoid a similar situation.
-
- Basically my problem stemmed from a typo on my part and the fact
- that C++ will automatically provide a default constructor for you if
- you don't provide one. To make a long story short, I had a class
- named 'QueryTable' and had defined a constructor 'queryTable::QueryTable'.
- Now obviously this is wrong, but what was screwing me up was that no
- error was being generated because G++ was happily providing me with
- a default constructor for my class.
-
- So, my question is this: Does anybody know if there is some way
- of at least getting G++ to warn you if it is using a default constructor?
- If I had that, I would've been able to figure this out much more quickly.
-
- -Eric Richard
-
- Eric Richard ----------------------------------- voice: (617) 577-9800
- net.Genesis fax: (617) 577-9850
- 68 Rogers St erichard@netgen.com
- Cambridge, MA 02142 --------------------------- http://www.netgen.com/
-
-
-